package com.gvfish.core;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.KeyFactory.Builder;
/**
 * 获取google key
 * @author ydm
 *
 */
public class KeyUtil {
//	public static Key getArticleKey(Long docId, Long id){
//			Builder builder = new KeyFactory.Builder(Doc.class.getSimpleName(),
//					docId);
//			builder.addChild(Article.class.getSimpleName(), id);
//			return builder.getKey();
//	}
//	public static Key getBlockKey(Long docId,Long articleId,Long blockId){
//		Builder builder = new KeyFactory.Builder(Doc.class.getSimpleName(),
//				docId);
//		builder.addChild(Article.class.getSimpleName(), articleId);
//		builder.addChild(Block.class.getSimpleName(), blockId);
//		return builder.getKey();
//	}
//	public static Key getCnBlockKey(Long docId,Long articleId,Long blockId,Long cnBlockId){
//		Builder builder = new KeyFactory.Builder(Doc.class.getSimpleName(),
//				docId);
//		builder.addChild(Article.class.getSimpleName(), articleId);
//		builder.addChild(Block.class.getSimpleName(), blockId);
//		builder.addChild(CnBlock.class.getSimpleName(), cnBlockId);
//		return builder.getKey();
//	}
}
